a=[1,23,45,45,63,235,52,52,21,12]
b=['a','b','c','d','e','f','g','h','i','j']
print(a)
print("\n".join(b))  # 将列表转为字符串
a.append(100)  # 追加
print(a)


list=[1,"dsdfsdf",4,[5,6,7,8,9],10,"dfg0",'s','s']
print(list[1])
print(f's出现的次数：{list.count("s")}')
print(f's第一次出现的位置：{list.index("s")}')
list.insert(2,"100")  # 在第二个位置插入100
print(list)
list.pop(2)  # 删除第二个位置的元素
print(list)
list.remove('s')  # 删除第一个s
print(list)
list.reverse()  # 反转   修改原列表
print(list)
list2=[1,4,6,26,3525,631,11,3]
list2.sort()  # 排序  修改原列表
print(list2)

list_str=['fafdf','bdf','cdfd','d','e','f','g']
list_str.sort()  # 降序
print(list_str) 

# for i in range(0x4e00,0x9fa6):  # 0x4e00-0x9fa6  汉字的范围
#     print(chr(i),end=" ")  # chr(i)  将整数转为字符
#     print(i,end=" ") # 输出整数

# list4 = [i for i in range(0,10000)]
# print(list4)  # 生成0-9999的列表



#9*9乘法表
for i in range(1,10):
    for j in range(1,i+1):
        print(f"{j}*{i}={i*j}",end="\t")
    print()  # 换行




# 列表去重
list5=[1,2,3,4,5,5,4,3,2,1]
print(list5)
list6=[]
for i in list5:
    if i not in list6:
        list6.append(i)
print(list6)
